<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@taglib prefix="k" uri="http://kazares.com.mx/jv/customtags" %>
<c:set var="jsp" value="${fn:replace(param.m, '.', '/')}" />
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>Juez virtual para concursos de programación</title>
        <link type="image/x-icon" rel="shortcut icon" href="${pageContext.request.contextPath}/recursos/imagenes/favicon.ico" />
        <link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/recursos/bootstrap/css/bootstrap.min.css" />
        <link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/recursos/estilos/acd.main.css" />
        <link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/recursos/font-awesome/css/font-awesome.min.css" />
        <link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/recursos/icomoon83691/style.css" />
        
        
        <c:if test="${jsp==null or jsp=='' or jsp=='index'}">
        <link rel="stylesheet" href="${pageContext.request.contextPath}/recursos/nivo-slider/themes/default/default.css" type="text/css" media="screen" />                
        <link rel="stylesheet" href="${pageContext.request.contextPath}/recursos/nivo-slider/nivo-slider.css" type="text/css" media="screen" />
        </c:if>
        <script type="text/javascript" src="${pageContext.request.contextPath}/recursos/jquery/jquery-1.10.1.min.js" ></script>
        <script type="text/javascript" src="${pageContext.request.contextPath}/recursos/bootstrap/js/bootstrap.min.js" ></script>
        <script type="text/javascript" src="${pageContext.request.contextPath}/recursos/scripts/jv-2-0.js"></script>
        <c:if test="${jsp==null or jsp=='' or jsp=='index'}"><script type="text/javascript" src="${pageContext.request.contextPath}/recursos/nivo-slider/jquery.nivo.slider.js"></script></c:if>
        
    </head>
    <body>
        <k:header />

        <c:catch var="exc">
            <c:forEach var="pageParameter" items="${param}">
                <c:set var="params" value="${params}&${pageParameter.key}=${pageParameter.value}" /> 
            </c:forEach>
            <div style="text-align: justify; width:1000px; margin: auto;">
            <jsp:include page="jspf/${(jsp==null or jsp=='')?'index':jsp}.jsp" />
            </div>
        </c:catch>        

        <c:if test="${true and exc != null and not fn:contains(exc, 'java.io.FileNotFoundException')}">            
            <div style="font-size:10px; text-align: justify; width:1000px; margin: auto;">
                <h1 class="text-info" style="boder:solid 1px red;">Error 500</h1>
                <c:out value="${exc}" />
                <c:forEach var="stackTraceElem" items="${exc.stackTrace}">
                    <c:out value="${stackTraceElem}"/><br/>
                </c:forEach>
            </div>
        </c:if>
        <c:if test="${fn:contains(exc, 'java.io.FileNotFoundException')}">
            <jsp:include page="jspf/404.jsp" />
        </c:if>

        <k:footer />        
    </body>
</html>
